package vno.fux.ui
{
	import vno.fux.events.MapEvent;
	import vno.fux.BasePoint;

	public class Minimap implements IComponent
	{
		private var _model:MinimapModel;
		private var _view:MinimapView;
		private var _controller:MinimapController;
		public function Minimap(id_:uint, resId_:uint)
		{
			_model		= new MinimapModel({id:id_,resId:resId_});
			_controller = new MinimapController(_model);
			_view		= new MinimapView(_model, _controller);
		}
		public function get view():BaseComponentView
		{
			return _view;
		}
		
		public function handleMapMove(event:MapEvent):void
		{
			_view.setCenter(new BasePoint(event.pos.x/10, event.pos.y/10));
		}
	}
}
